package morenoapp.components.thinkgraphv2.components;

import com.l2fprod.common.swing.JTaskPane;
import com.l2fprod.common.swing.JTaskPaneGroup;
import java.awt.BorderLayout;
import java.awt.Color;
import javax.swing.JPanel;
import morenoapp.model.view2.MorenoView2Face;
import morenoapp.util.I18N;

/**
 *
 * @author dmitry.mamonov
 */
public class ThinkgraphDisplayConfigJPanel extends javax.swing.JPanel {
    MorenoView2Face config;
    JTaskPane taskPane;

    /** Creates new form FilterJPanel
     * @param _config 
     */
    public ThinkgraphDisplayConfigJPanel(MorenoView2Face _config) {
        this.config = _config;

        initComponents();

        add(taskPane);
    }

    private void initComponents() {
        setName("ThinkgraphDisplayConfiguration"); // NOI18N
        setLayout(new BorderLayout(0, 0));
        taskPane = new JTaskPane();
        {
            taskPane.setBackground(Color.GRAY);
            { //common filter
                JTaskPaneGroup group = new JTaskPaneGroup();
                group.setTitle(I18N.get("label.graph.common_parameters"));
                group.setToolTipText(null);
                group.setSpecial(false);
                group.setIcon(null);
                group.add(new CommonDisplayConfigJPanel(config));
                taskPane.add(group);
            }
            { //layout filter
                JTaskPaneGroup group = new JTaskPaneGroup();
                group.setTitle(I18N.get("label.graph.graph_nodes_layout"));
                group.setToolTipText(null);
                group.setSpecial(false);
                group.setIcon(null);
                group.add(new SociogramLayoutConfigPanel());
                taskPane.add(group);
            }
            { //nodes filter
                JTaskPaneGroup group = new JTaskPaneGroup();
                group.setTitle(I18N.get("label.graph.filter_by_graph_nodes"));
                group.setToolTipText(null);
                group.setSpecial(false);
                group.setIcon(null);
                group.add(new RespondentDisplayConfigPanel(config));
                taskPane.add(group);
            }
            /*
            { //nodes grouping - not yet implemented
                JTaskPaneGroup group = new JTaskPaneGroup();
                group.setTitle(I18N.get("label.graph.graph_nodes_grouping"));
                group.setToolTipText(null);
                group.setSpecial(false);
                group.setIcon(null);
                group.add(new JPanel());
                taskPane.add(group);
            }
            */
            { //edges filter
                JTaskPaneGroup group = new JTaskPaneGroup();
                group.setTitle(I18N.get("label.graph.filter_by_relationships"));
                group.setToolTipText(null);
                group.setSpecial(false);
                group.setIcon(null);
                group.add(new RelationshipsDisplayConfigJPanel(config));
                taskPane.add(group);
            }
        }
        add(taskPane);
    }
}
